import request from '@/utils/request'

export const addToCart = (goodsId, goodsNum, goodsSkuId) => {
  return request.post('/cart/add', {
    goodsId,
    goodsNum,
    goodsSkuId
  })
}

export const getCartList = () => {
  return request.get('/cart/list')
}

export const subGoodsCart = (id) => {
  return request({ url: '/cart/clear', method: 'post', data: { cartIds: id } })
}
